package com.jagochan.module.business.pojo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;

/**
 * 帖子(文章)VO（包含了用户端某些信息）
 */
@Data
@Schema(description = "帖子(文章)")
public class ArticleVO {

    @Schema(description = "主键ID")
    private Integer id;

    @Schema(description = "作者ID(发布人)")
    private Integer userId;

    @Schema(description = "标题")
    private String title;

    @Schema(description = "图片数组")
    private String[] images;

    @Schema(description = "分享链接")
    private String url;

    @Schema(description = "所属分类ID")
    private Integer categoryId;

    @Schema(description = "所属话题ID")
    private Integer topicId;

    @Schema(description = "分享数")
    private Integer shareCount;

    @Schema(description = "点赞数")
    private Integer dingCount;

    @Schema(description = "踩数")
    private Integer caiCount;

    @Schema(description = "评论数")
    private Integer commentCount;

    @Schema(description = "浏览数")
    private Integer readCount;

    @Schema(description = "收藏数")
    private Integer collectCount;

    @Schema(description = "发布时间")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date createTime;

    @Schema(description = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date updateTime;

    @Schema(description = "内容")
    private String content;

    /*
      下面的是【用户】相关信息
     */
    @Schema(description = "作者名称")
    private String name;

    @Schema(description = "作者头像")
    private String avatar;

    @Schema(description = "作者状态")
    private Integer userStatus;

    @Schema(description = "话题名")
    private String topicName;

    @Schema(description = "作者支持操作")
    private String userSupportAction;

    @Schema(description = "是否关注")
    private Boolean isFollow;

}
